<template>
    <div class="article">
        <h1>{{this.title}}</h1>
        <p class="p">{{this.description}}</p>
        <Markdown :content="content" />
    </div>
</template>

<script>
    // import Markdown from 'vue-meditor'
    // import Markdown from "vue-meditor/src/mixins/common"
    import Markdown from '../../../../components/Markdown.vue'
    import $ from 'jquery'
    export default {
        name: "articlae",
        data() {
            return {
                title:'',
                description:'',
                content: "" ,
                skypegmwcn_article: this.$cloudbase.database().collection('skypegmwcn_article')
            }
        }
        ,

        components:{Markdown},
        created(){

            $('html,body').scrollTop(0)
            // console.log(this.skypegmwcn_article)
            // console.log(this.$route.query._id)
            this.skypegmwcn_article.doc(this.$route.query._id).get().then(res=>{
                this.content = res.data[0].article
                this.title= res.data[0].title
                this.description = res.data[0].description
            })
        }
        // components: {Markdown},
    }
</script>

<style scoped>
@import "../../../css/home/article.css";
</style>